import java.util.Random;

/**
 * 
 */

/**
 * @author Aditya Desai
 *
 */
public class EventController {

	private enum EventEnum {STORM, DISEASE, WAGON_DAMAGED, INVENTORY_LOSS, PLAYER_DEATH, SETTLER_DEATH};
	private EventEnum myEvent;
	private int randNum;
	private Random generator;

	
	public void setRandomEvent() {
		generator = new Random();
		randNum = generator.nextInt(11);
		switch (randNum) {
		case 0:
			myEvent = EventEnum.STORM;
			break;
		case 1:
			myEvent = EventEnum.DISEASE;
			break;
		case 2:
			myEvent = EventEnum.WAGON_DAMAGED;
			break;
		case 3:
			myEvent = EventEnum.INVENTORY_LOSS;
			break;
		case 4:
			myEvent = EventEnum.SETTLER_DEATH;
			break;
		default:
			myEvent = EventEnum.INVENTORY_LOSS;
			break;
		}
	}
	
	
	public String getEvent() {
		return myEvent.toString();
	}
}
